<style type="text/css">

    .orange {
        background: #fa8564 !important;
    }

    .tar {
        background: #45cf95 !important;
    }



    .pink {
        background: #AC75F0 !important;
    }

    .yellow-b {
        background: #fdd752 !important;
    }

    .stat-elem {

        background-color: #fff;
        padding: 18px;
        border-radius: 40px;

    }

    .stat-info {
        text-align: center;
        background-color: #fff;
        border-radius: 5px;
        margin-top: -5px;
        padding: 8px;
        -webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
        box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
        font-style: italic;
    }

    .stat-icon {
        text-align: center;
        margin-bottom: 5px;
    }

    .st-red {
        background-color: #F05050;
    }

    .st-green {
        background-color: #27C24C;
    }

    .st-violet {
        background-color: #7266ba;
    }

    .st-blue {
        background-color: #23b7e5;
    }

    .stats .stat-icon {
        color: #28bb9c;
        display: inline-block;
        font-size: 26px;
        text-align: center;
        vertical-align: middle;
        width: 50px;
        float: left;
    }

    .stat {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
    }

    .stat .value {
        font-size: 20px;
        line-height: 24px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 500;
    }

    .stat .name {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stat.lg .value {
        font-size: 26px;
        line-height: 28px;
    }

    .stat.lg .name {
        font-size: 16px;
    }

    .stat-col .progress {
        height: 2px;
    }

    .stat-col .progress-bar {
        line-height: 2px;
        height: 2px;
    }

    .item {
        padding: 30px 0;
    }



    #statistics .panel {
        min-height: 150px;
    }

    #statistics .panel h5 {
        font-size: 13px;
    }
	.invoice{
	    position: unset;
		background: unset;
		border: unset;
		padding: unset;
		margin: unset;
	}
</style>

<div class="panel panel-default panel-intro">
    <div class="panel-body">
    <div class="row">

        <div class="col-lg-12">
            <div class="card sameheight-item stats">
                <div class="card-block">
                    <div class="row row-sm stats-container">
                        <div class="col-xs-4 stat-col">
                            <div class="stat-icon"><i class="fa fa-users"></i></div>
                            <div class="stat text-blue ">
                                <a href="facrm/customer/index?ref=addtabs&from_type=need" class="btn-addtabs" title="{:__('需跟进的客户')}">
                                    <div class="value"> {$communicate}</div>
                                    <div class="name"> {:__('今日需跟进的客户')}</div>
                                </a>
                            </div>
                            <div class="progress">
                                <div class="progress-bar progress-bar-success" style="width: 30%"></div>
                            </div>
                        </div>
                        <div class="col-xs-4 stat-col">
                            <div class="stat-icon text-red "><i class="fa fa-flag"></i></div>
                            <div class="stat">
                                <a href="facrm/customer/index?ref=addtabs&from_type=expire" class="btn-addtabs" title="{:__('即将过期客户')}">
                                <div class="value"> {$lose_num}</div>
                                <div class="name"> {:__('即将过期的客户')}</div>
                                </a>
                            </div>
                            <div class="progress">
                                <div class="progress-bar progress-bar-success" style="width: 25%"></div>
                            </div>
                        </div>
                        <div class="col-xs-4  stat-col">
                            <div class="stat-icon"><i class="fa fa-calendar-check-o"></i></div>
                            <div class="stat">
                                <a href="facrm/business/index?ref=addtabs&from_type=need" class="btn-addtabs" title="{:__('需跟进的商机')}">
                                    <div class="value"> {$business}</div>
                                    <div class="name"> {:__('今日需跟进的商机')}</div>
                                </a>
                            </div>
                            <div class="progress">
                                <div class="progress-bar progress-bar-success" style="width: 25%"></div>
                            </div>
                        </div>
                        {if($auth->check('facrm/contract/index'))}

                        <div class="col-xs-4  stat-col">
                            <div class="stat-icon text-red"><i class="fa fa-calendar-times-o"></i></div>
                            <div class="stat">
                                <a href="facrm/contract/index?ref=addtabs&from_type=expire" class="btn-addtabs" title="{:__('即将到期合同')}">
                                <div class="value"> {$contract_expire}</div>
                                <div class="name"> {:__('即将到期合同')}</div>
                                </a>
                            </div>
                            <div class="progress">
                                <div class="progress-bar progress-bar-success" style="width: 25%"></div>
                            </div>
                        </div>
                        <div class="col-xs-4  stat-col">
                            <div class="stat-icon text-info"><i class="fa fa-list-alt"></i></div>
                            <div class="stat">
                                <a href="facrm/contract/index?ref=addtabs&from_type=return" class="btn-addtabs" title="{:__('即将到期合同')}">
                                <div class="value"> {$contract_return}</div>
                                <div class="name"> {:__('待回款合同')}</div>
                                </a>
                            </div>
                            <div class="progress">
                                <div class="progress-bar progress-bar-success" style="width: 25%"></div>
                            </div>
                        </div>
                        {/if}


                        <div class="col-xs-4  stat-col">
                            <div class="stat-icon text-info"><i class="fa fa-link fa-fw"></i></div>
                            <div class="stat">
                                <a href="facrm/clues/index?ref=addtabs&from_type=need" class="btn-addtabs" title="{:__('待跟进线索')}">
                                    <div class="value"> {$clues_num}</div>
                                    <div class="name"> {:__('待跟进线索')}</div>
                                </a>
                            </div>
                            <div class="progress">
                                <div class="progress-bar progress-bar-success" style="width: 25%"></div>
                            </div>
                        </div>





                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>

    <div class="panel-heading">
        <span class="pull-right-container">
            <a class="label pull-right bg-purple "
            href='javascript:Layer.alert("<img src=\"{:url("facrm/common/qrcode")}?text={:url("facrm/third/connect","","",true)}\" style=\"max-height:250px;max-width:250px\"><p>请用微信扫描，如要登录请登录然后再扫。</p>");'>
                <i class="fa fa-qrcode fa-fw"></i>绑定公众号
            </a>
            </span>
        {:build_heading(null,FALSE)}
        <ul class="nav nav-tabs" data-field1="scene_id">
            {foreach name="scene_list" item="vo"  index="i" }
            <li {if condition="$i eq 1"}class='active'{/if}><a  href="#t-{$key}" data-value="{$key}" data-toggle="tab">
            {$vo}<span class="pull-right-container {$key}"><small class="label pull-right bg-orange"></small></span>
            </a></li>

            {/foreach}
        </ul>

    </div>



    <div class="panel-body">

        <div class="widget-body no-padding">
            <div id="myTabContent" class="tab-content">
                    
                    {foreach name="scene_list" item="vo"  index="i" }
					<div id="toolbar{$i}" class="toolbar ">
                        <a href="javascript:;" class="btn btn-primary btn-refresh" data-force-refresh='false'><i class="fa fa-refresh"></i></a>
                    </div>
                    <div class="tab-pane fade  {if $i==1} active in{/if}" id="t-{$key}">
                        <table id="{$key}" class="table table-striped table-bordered table-hover  table-nowrap"
                               width="100%">
                        </table>
                    </div>
                    {/foreach}
            </div>
        </div>
    </div>
</div>

<script>
    var scene_list={:json_encode($scene_list)};
</script>